package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 检查考评规则表
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Data
@DbTable(tableName = "t_evaluation_rules")
public class EvaluationRules extends BaseEntity {
        /**
     * uuid
     */
    @DbTableField(columnName = "c_rule_id", dbType = DbTypeEnum.VARCHAR)
    public String ruleId ;

    /**
     * 父uuid
     */
    @DbTableField(columnName = "c_rule_pid", dbType = DbTypeEnum.VARCHAR)
    public String rulePid ;

    /**
     * 内容
     */
    @DbTableField(columnName = "c_content", dbType = DbTypeEnum.VARCHAR)
    public String content ;

    /**
     * 大类总分
     */
    @DbTableField(columnName = "c_item_score", dbType = DbTypeEnum.DOUBLE)
    public Double itemScore ;

    /**
     * 应得分
     */
    @DbTableField(columnName = "c_total_score", dbType = DbTypeEnum.DOUBLE)
    public Double totalScore ;

    /**
     * 扣分
     */
    @DbTableField(columnName = "c_dock_score", dbType = DbTypeEnum.DOUBLE)
    public Double dockScore ;

    /**
     * 单位
     */
    @DbTableField(columnName = "c_unit", dbType = DbTypeEnum.VARCHAR)
    public String unit ;

    /**
     * 层级
     */
    @DbTableField(columnName = "c_layer", dbType = DbTypeEnum.INTEGER)
    public Integer layer ;

    /**
     * 排序
     */
    @DbTableField(columnName = "c_order_num", dbType = DbTypeEnum.INTEGER)
    public Integer orderNum ;

    /**
     * 修改人
     */
    @DbTableField(columnName = "c_db_update_id", dbType = DbTypeEnum.INTEGER)
    public Integer dbUpdateId ;

    /**
     * 修改时间
     */
    @DbTableField(columnName = "c_db_update_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime dbUpdateDate ;

    /**
     * 单位数值
     */
    @DbTableField(columnName = "c_unit_value", dbType = DbTypeEnum.DOUBLE)
    public Double unitValue ;

    public List<EvaluationRules> children;

}
